/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.Dictionary;
import java.awt.*;
import java.awt.datatransfer.*;
import java.io.*;


/**
 *
 * @author BunEri0463
 */
public class AddText implements ClipboardOwner{
    
    public static void main(String def)
    {
      AddText at=new AddText();
      at.addToClipboard(def);
    }
    
    public void lostOwnership(Clipboard aClipboard, Transferable aContents)
    {
     //does nothing
    }
    
    public void addToClipboard(String def)
    {
     StringSelection select=new StringSelection(def);
      Clipboard clip=Toolkit.getDefaultToolkit().getSystemClipboard();
      clip.setContents(select, this);
    }
}
